package org.wk.core.db.dao;

import java.io.Serializable;

import javax.persistence.EntityManager;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean;
import org.springframework.data.repository.core.support.RepositoryFactorySupport;

/**
 * 
 * @ClassName	: GenericJpaRepositoryFactoryBean
 * @Package		：org.wk.core.db.dao
 * @Author df.w 
 * @Create Time	：2018年5月2日 上午9:57:50
 * @Description	: 
 * @param <T>
 * @param <S>
 * @param <ID>
 */
public class GenericJpaRepositoryFactoryBean<T extends JpaRepository<S, ID>, S, ID extends Serializable>
		extends JpaRepositoryFactoryBean<T, S, ID> {

	
	/**
	 * <p>Title: </p>
	 * <p>Description: </p>
	 * @param repositoryInterface
	 */ 
	
	public GenericJpaRepositoryFactoryBean(Class<? extends T> repositoryInterface) {
		super(repositoryInterface);
		// TODO Auto-generated constructor stub
	}

	@Override
	protected RepositoryFactorySupport createRepositoryFactory(EntityManager entityManager) {
		return new GenericRepositoryFactory<T, ID>(entityManager);
	}

}
